using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace BusinessLayer.Model
{
    /// <summary>
    /// Klasa odpowiadajaca zindeksowanemu slowu
    /// </summary>
    public class Word
    {
        //private int id;

        /// <summary>
        /// Tekst slowa
        /// </summary>
        private string text;

        //private IList<IndexElement> indexElements = new List<IndexElement>();

        /// <summary>
        /// Kolekcja elementow indeksu powiazanych ze slowem
        /// </summary>
        private Iesi.Collections.Generic.ISet<IndexElement> indexElements = new Iesi.Collections.Generic.HashedSet<IndexElement>();

        public Word()
        {
        }

        public Word(string text)
        {
            this.text = text;
        }

        /*public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }*/

        public virtual string Text
        {
            get { return text; }
            set { text = value; }
        }

        public virtual Iesi.Collections.Generic.ISet<IndexElement> IndexElements
        {
            get { return indexElements; }
            set { indexElements = value; }
        }

        public override int GetHashCode()
        {
            return text.GetHashCode();
        }
    }
}
